<%@page import="java.util.List"%>
<%@page import="com.jfinal.plugin.activerecord.Page"%>
<%@page import="com.hongye.app.model.OrderInfoModel"%>
<%@page import="com.hongye.app.model.OrderGoodsModel"%>
<%@page import="com.hongye.app.model.ReturnGoodsModel"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" isELIgnored="false"
    pageEncoding="UTF-8"%>
 <% OrderInfoModel order = (OrderInfoModel)request.getAttribute("order"); %>
  <% ReturnGoodsModel returngoods = (ReturnGoodsModel)request.getAttribute("returngoods"); %>
  <%String data=(String)request.getAttribute("data");%>
<!doctype html>
<html class="fixed">
	<head>
		<!-- Basic -->
		<meta charset="UTF-8">
		<meta name="keywords" content="HTML5 Admin Template" />
		<meta name="description" content="Porto Admin - Responsive HTML5 Template">
		<meta name="author" content="okler.net">
		<!-- Mobile Metas -->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<!-- Vendor CSS -->
		<link rel="stylesheet" href="../admin/css/bootstrap.css" />
		<link rel="stylesheet" href="../admin/css/font-awesome/css/font-awesome.css" />
        <link rel="stylesheet" href="../admin/css/select2.css" />
		<!-- Theme CSS -->
		<link rel="stylesheet" href="../admin/css/theme.css" />
		<!-- Skin CSS -->
		<link rel="stylesheet" href="../admin/css/default.css" />
		<!-- Theme Custom CSS -->
		<!-- Theme Custom ../admin/css -->
		<script src="../admin/js/modernizr.js"></script>
	</head>
	<body>
		<section role="main" class="content-body" style="margin-top: 50px; height:1500px;">
			<!-- start: page -->
			<section class="panel">
				<header class="panel-heading">
					<h2 class="panel-title">订单-详情</h2>
				</header>
				<div class="panel-body">
					<div class="panel-body">
						<p><span class="alternative-font">商家信息</span></p>
						<p>商家昵称：<%=order.get("seller_nick") %></p>
						<p>商家手机号：<%=order.get("seller_phone") %></p>
						<p>商家店铺名称：<%=order.get("seller_shopname") %></p>
						
						<p><span class="alternative-font">买家信息</span></p>
						<p>买家昵称：<%=order.get("buyer_nick") %></p>
						<p>买家手机号：<%=order.get("phone") %></p>
						<p>收货人手机号：<%=order.get("consignee_phone") %></p>
						<p>收货人姓名：<%=order.get("consignee") %></p>
						<p>收货地址：<%=order.get("country") %>&nbsp;&nbsp;<%=order.get("provice") %>&nbsp;&nbsp;<%=order.get("city") %>&nbsp;&nbsp;<%=order.get("district") %>&nbsp;&nbsp;<%=order.get("address") %></p>
						
						<p><span class="alternative-font">订单信息</span></p>
						<p>订单编号 <%=order.get("order_sn") %></p>
						<p>订单状态：<%int state=order.getInt("order_status"); 
								if(state==0){out.println("待付款");
								}else if(state==1){out.println("付款确认中");
								}else if(state==2){out.println("待发货");
								}else if(state==3){out.println("待收货");
								}else if(state==4){out.println("已收到货物");
								}else if(state==5){out.println("待评论");
								}else if(state==6){out.println("订单已取消");
								}else if(state==7){out.println("交易完成");
								}else if(state==8){out.println("退款中 ");
								}else if(state==9){out.println("退款成功 ");
								}else if(state==10){out.println("退货中");
								}else if(state==10){out.println("退货成功");
								}else if(state==11){out.println("结算成功 ");} %></p>
						<%int state_pay = order.getInt("order_status");
							if(state_pay > 1 && state_pay != 1 && state_pay != 6){%>
								<p>交易渠道：<%String payment_channel=order.getStr("payment_channel"); if(payment_channel.equals("0")){out.println("支付宝支付");}else{out.println("微信支付");}%></p>
								<p>交易号：<%=order.get("trade_num") %></p>
						<%}%>
						<p>订单金额￥：<%=order.get("total_price") %></p>
						<p>配送方式：<%=order.get("postage_typeName") %></p>
						<p>买家留言：<%=order.get("buyer_message") %></p>
						<p>购买时间：<%=order.get("orderc_time") %></p>
						<p>付款时间：<%=order.get("pay_time") %></p>
						<p>发货时间：<%=order.get("bill_time") %></p>
						<p>快递单号：<%=order.get("waybillnumber") %></p>
						<p>快递公司：<%=order.get("express") %></p>
						<p>是否延期收货：<%int isdelay=order.getInt("isdelay"); if(isdelay == 0){out.println("未延期收货");}else{out.println("已延期收货");}%></p>
						<p>是否提醒收货：<%int isRemindShipment=order.getInt("isRemindShipment"); if(isRemindShipment == 0){out.println("未提醒收货");}else{out.println("已提醒收货");}%></p>
						<p>是否删除订单：<%int del=order.getInt("del"); if(del == 0){out.println("正常");}else{out.println("买家已删除");}%></p>
						
						<p><span class="alternative-font">商品信息</span></p>
						
						<table class="table table-bordered table-striped mb-none" id="datatable-default">
						<thead>
							<tr>
								<th class="hidden-phone center">商品名称</th>
								<th class="hidden-phone center">商品价格(￥)</th>
								<th class="hidden-phone center">商品数量</th>
							</tr>
						</thead>
						<tbody>
							<%List<OrderGoodsModel> ordergoodslist = (List)request.getAttribute("ordergoods");
							for(int i=1;i<=ordergoodslist.size();i++){
								OrderGoodsModel og = ordergoodslist.get(i-1);
							%>
							<tr class="gradeA">
								<td class="center hidden-phone"><%=og.get("goods_name") %></td>
								<td class="center hidden-phone"><%=og.get("goods_price") %></td>
								<td class="center hidden-phone"><%=og.get("goods_num") %></td>
							</tr>
							<%} %>
						</tbody>
					</table>
					<p><span class="alternative-font"></span></p>
						<div class="mb-xs text-center">
						<a class="btn btn-facebook mb-md ml-xs mr-xs" href="../order/orderview">确定 </a>
                        <a class="btn btn-facebook mb-md ml-xs mr-xs" href="../order/orderview" >返回</a>
					</div>
				</div>
			</section>
<!-- Specific Page Vendor -->
<!-- Vendor -->
<script src="../admin/js/jquery.js"></script>
<!-- Theme Base, Components and Settings -->
<script src="../admin/js/theme.js"></script>
<!-- Theme Custom -->
<script src="../admin/js/theme.custom.js"></script>
<!-- Theme Initialization Files -->
<script src="../admin/js/theme.init.js"></script>
<!-- Examples -->
<script src="../admin/js/tables/examples.datatables.default.js"></script>
<script src="../admin/js/tables/examples.datatables.row.with.details.js"></script>
<script src="../admin/js/tables/examples.datatables.tabletools.js"></script>
<script type="text/javascript">
</script>
</body>
</html>